y = [...
  0x7D, 0x7B, 0x7D, 0x7D, 0x7B, 0x7D, 0x7A, 0x7A, 0x7F, 0x7C, 0x78, 0x76,	...
  0x76, 0x75, 0x78, 0x77, 0x75, 0x72, 0x74, 0x75, 0x74, 0x78, 0x77, 0x78,	...
	0x7D, 0x7C, 0x76, 0x83, 0x81, 0x7C, 0x81, 0x83, 0x83, 0x85, 0x8A, 0x87,	...
	0x86, 0x85, 0x8C, 0x87, 0x8A, 0x8D, 0x8B, 0x93, 0x8D, 0x8A, 0x99, 0x8F,	...
	0x84, 0x90, 0x8B, 0x84, 0x84, 0x7D, 0x74, 0x71, 0x71, 0x75, 0x6D, 0x6D,	...
	0x73, 0x69, 0x6A, 0x6D, 0x67, 0x72, 0x6D, 0x6B, 0x74, 0x6F, 0x76, 0x76,	...
	0x72, 0x7A, 0x78, 0x77, 0x82, 0x79, 0x7C, 0x81, 0x77, 0x80, 0x82, 0x78,	...
	0x8B, 0x8B, 0x81, 0x8F, 0x8A, 0x8B, 0x84, 0x83, 0x87, 0x7B, 0x7E, 0x7D,	...
	0x6C, 0x6B, 0x6D, 0x69, 0x68, 0x69, 0x69, 0x6C, 0x6A, 0x6A, 0x6D, 0x6C,	...
	0x76, 0x72, 0x76, 0x7E, 0x7D, 0x7F, 0x81, 0x81, 0x82, 0x88, 0x8A, 0x85,	...
	0x8D, 0x87, 0x84, 0x91, 0x82, 0x87, 0x90, 0x89, 0x89, 0x8D, 0x91, 0x8D,	...
	0x89, 0x89, 0x88, 0x84, 0x86, 0x80, 0x73, 0x73, 0x70, 0x6D, 0x70, 0x68,	...
	0x6E, 0x6E, 0x6C, 0x73, 0x70, 0x78, 0x7B, 0x77, 0x80, 0x85, 0x84, 0x87,	...
	0x87, 0x83, 0x89, 0x8C, 0x86, 0x90, 0x8C, 0x8A, 0x92, 0x8A, 0x8A, 0x89,	...
	0x8C, 0x88, 0x83, 0x88, 0x87, 0x86, 0x83, 0x80, 0x7D, 0x7E, 0x80, 0x74,	...
	0x71, 0x6E, 0x69, 0x68, 0x62, 0x64, 0x64, 0x67, 0x6B, 0x6A, 0x6D, 0x73,	...
	0x76, 0x76, 0x7D, 0x7F, 0x7F, 0x87, 0x7F, 0x80, 0x8A, 0x80, 0x88, 0x88,	...
	0x86, 0x8E, 0x8E, 0x8C, 0x8A, 0x8D, 0x91, 0x8D, 0x8C, 0x8D, 0x8B, 0x8A,	...
	0x8C, 0x83, 0x81, 0x89, 0x84, 0x82, 0x7B, 0x7A, 0x79, 0x70, 0x71, 0x6F,	...
	0x6D, 0x71, 0x70, 0x70, 0x74, 0x76, 0x76, 0x7A, 0x7C, 0x7A, 0x84, 0x7F,	...
	0x7C, 0x7F, 0x7C, 0x7F, 0x7F, 0x82, 0x85, 0x8B, 0x90, 0x8B, 0x8C, 0x8F,	...
	0x8F, 0x8F, 0x8E, 0x8D, 0x8B, 0x90, 0x8C, 0x85, 0x84, 0x86, 0x88, 0x7F,	...
	0x7E, 0x7D, 0x78, 0x75, 0x70, 0x6C, 0x6A, 0x6B, 0x6B, 0x6B, 0x6F, 0x6C,	...
	0x70, 0x74, 0x70, 0x77, 0x7B, 0x79, 0x7A, 0x7A, 0x7A, 0x7A, 0x7C, 0x7A,	...
	0x7D, 0x84, 0x86, 0x84, 0x84, 0x88, 0x88, 0x8A, 0x8A, 0x85, 0x8A, 0x8D,	...
	0x8C, 0x86, 0x83, 0x89, 0x87, 0x82, 0x81, 0x7D, 0x79, 0x76, 0x72, 0x6D,	...
	0x6C, 0x6C, 0x6C, 0x71, 0x6E, 0x70, 0x76, 0x75, 0x76, 0x7B, 0x80, 0x81,	...
	0x82, 0x83, 0x82, 0x85, 0x84, 0x82, 0x86, 0x8A, 0x8D, 0x8C, 0x8B, 0x8A,	...
	0x8B, 0x8E, 0x8C, 0x89, 0x8B, 0x91, 0x8E, 0x87, 0x86, 0x88, 0x86, 0x84,	...
	0x82, 0x7F, 0x7A, 0x7A, 0x74, 0x71, 0x6F, 0x6B, 0x71, 0x71, 0x6E, 0x73,	...
	0x76, 0x76, 0x77, 0x7B, 0x7F, 0x80, 0x81, 0x81, 0x82, 0x83, 0x83, 0x80,	...
	0x83, 0x87, 0x89, 0x8D, 0x8A, 0x8A, 0x8C, 0x8D, 0x8D, 0x87, 0x88, 0x8F,	...
	0x8B, 0x86, 0x85, 0x84, 0x83, 0x83, 0x82, 0x7D, 0x7D, 0x7A, 0x77, 0x75,	...
	0x6F, 0x6E, 0x72, 0x71, 0x6E, 0x72, 0x74, 0x72, 0x75, 0x75, 0x79, 0x7C,	...
	0x7D, 0x7E, 0x7F, 0x82, 0x81, 0x7F, 0x82, 0x84, 0x8A, 0x8E, 0x8D, 0x8D,	...
	0x8E, 0x92, 0x91, 0x8B, 0x8E, 0x92, 0x8F, 0x8C, 0x8C, 0x88, 0x8A, 0x8A,	...
	0x87, 0x87, 0x82, 0x81, 0x80, 0x7B, 0x76, 0x73, 0x75, 0x73, 0x71, 0x74,	...
	0x73, 0x73, 0x74, 0x74, 0x77, 0x7C, 0x7B, 0x7C, 0x7E, 0x7E, 0x80, 0x7E,	...
	0x7E, 0x81, 0x84, 0x8A, 0x8A, 0x87, 0x8B, 0x8E, 0x8C, 0x88, 0x89, 0x8D,	...
	0x8A, 0x89, 0x86, 0x84, 0x85, 0x84, 0x84, 0x83, 0x7F, 0x7E, 0x7E, 0x78,	...
	0x73, 0x73, 0x71, 0x71, 0x70, 0x6F, 0x72, 0x71, 0x71, 0x71, 0x74, 0x78,	...
	0x78, 0x7A, 0x7C, 0x7C, 0x7D, 0x7C, 0x7C, 0x7D, 0x81, 0x87, 0x88, 0x86,	...
	0x8A, 0x8E, 0x8A, 0x89, 0x8A, 0x8A, 0x8D, 0x8A, 0x88, 0x87, 0x85, 0x86,	...
	0x86, 0x85, 0x81, 0x81, 0x82, 0x7C, 0x78, 0x77, 0x75, 0x74, 0x74, 0x73,	...
	0x74, 0x75, 0x73, 0x74, 0x77, 0x7A, 0x7C, 0x7C, 0x7F, 0x80, 0x80, 0x82,	...
	0x7F, 0x7F, 0x83, 0x89, 0x8A, 0x88, 0x8D, 0x8F, 0x8C, 0x8C, 0x8A, 0x8C,	...
	0x8C, 0x8A, 0x88, 0x87, 0x84, 0x85, 0x87, 0x84, 0x82, 0x82, 0x82, 0x7F,	...
	0x7A, 0x78, 0x76, 0x75, 0x74, 0x72, 0x74, 0x74, 0x72, 0x72, 0x74, 0x77,	...
	0x78, 0x79, 0x7C, 0x7C, 0x7E, 0x7F, 0x7D, 0x7B, 0x81, 0x86, 0x86, 0x88,	...
	0x8B, 0x8D, 0x8D, 0x8B, 0x8B, 0x8C, 0x8D, 0x8B, 0x8B, 0x89, 0x85, 0x87,	...
	0x88, 0x85, 0x84, 0x85, 0x84, 0x82, 0x7F, 0x7B, 0x79, 0x78, 0x76, 0x75,	...
	0x76, 0x76, 0x74, 0x73, 0x76, 0x77, 0x79, 0x7B, 0x7C, 0x7E, 0x80, 0x82,	...
	0x7E, 0x7D, 0x83, 0x85, 0x87, 0x89, 0x8B, 0x8E, 0x8F, 0x8D, 0x8D, 0x8E,	...
	0x8E, 0x8F, 0x8E, 0x8A, 0x88, 0x88, 0x89, 0x87, 0x86, 0x85, 0x84, 0x84,	...
	0x80, 0x7C, 0x7B, 0x78, 0x76, 0x75, 0x75, 0x75, 0x73, 0x72, 0x73, 0x74,	...
	0x75, 0x78, 0x78, 0x79, 0x7D, 0x7E, 0x7B, 0x7A, 0x7D, 0x80, 0x82, 0x84,	...
	0x87, 0x8B, 0x8B, 0x8A, 0x8B, 0x8B, 0x8B, 0x8C, 0x8C, 0x88, 0x86, 0x87,	...
	0x86, 0x85, 0x84, 0x82, 0x83, 0x82, 0x7F, 0x7C, 0x7A, 0x78, 0x74, 0x74,	...
	0x74, 0x73, 0x72, 0x71, 0x72, 0x72, 0x74, 0x77, 0x75, 0x78, 0x7C, 0x7D,	...
	0x7B, 0x7A, 0x7C, 0x7F, 0x81, 0x82, 0x86, 0x89, 0x8A, 0x8B, 0x8B, 0x8A,	...
	0x8B, 0x8D, 0x8D, 0x8A, 0x89, 0x87, 0x88, 0x87, 0x85, 0x85, 0x85, 0x85,	...
	0x82, 0x7F, 0x7E, 0x7B, 0x78, 0x77, 0x77, 0x76, 0x75, 0x75, 0x73, 0x73,	...
	0x76, 0x77, 0x76, 0x78, 0x7D, 0x7D, 0x7C, 0x7B, 0x7B, 0x7E, 0x7F, 0x80,	...
	0x84, 0x87, 0x88, 0x8A, 0x8A, 0x89, 0x8A, 0x8C, 0x8C, 0x8A, 0x88, 0x87,	...
	0x87, 0x87, 0x84, 0x83, 0x84, 0x84, 0x82, 0x80, 0x7E, 0x7B, 0x77, 0x77,	...
	0x77, 0x75, 0x75, 0x74, 0x72, 0x73, 0x75, 0x76, 0x76, 0x78, 0x7B, 0x7D,	...
	0x7D, 0x7B, 0x7C, 0x7E, 0x7E, 0x80, 0x84, 0x86, 0x89, 0x8B, 0x8B, 0x8A,	...
	0x8C, 0x8D, 0x8E, 0x8D, 0x8B, 0x8A, 0x8A, 0x89, 0x87, 0x86, 0x86, 0x86,	...
	0x84, 0x82, 0x81, 0x7D, 0x7A, 0x79, 0x77, 0x76, 0x77, 0x76, 0x73, 0x74,	...
	0x75, 0x76, 0x76, 0x77, 0x7A, 0x7D, 0x7D, 0x7C, 0x7D, 0x7E, 0x7E, 0x7F,	...
	0x83, 0x85, 0x88, 0x8A, 0x8B, 0x8B, 0x8B, 0x8D, 0x8E, 0x8D, 0x8B, 0x8A,	...
	0x8A, 0x89, 0x87, 0x86, 0x86, 0x85, 0x83, 0x83, 0x81, 0x7D, 0x7A, 0x78,	...
	0x76, 0x74, 0x75, 0x73, 0x71, 0x71, 0x72, 0x73, 0x73, 0x73, 0x77, 0x79,	...
	0x79, 0x79, 0x7A, 0x7A, 0x7A, 0x7C, 0x7E, 0x80, 0x83, 0x86, 0x87, 0x87,	...
	0x88, 0x89, 0x8C, 0x8B, 0x89, 0x89, 0x89, 0x88, 0x86, 0x85, 0x85, 0x84,	...
	0x83, 0x83, 0x81, 0x7E, 0x7C, 0x79, 0x76, 0x76, 0x76, 0x74, 0x72, 0x72,	...
	0x73, 0x74, 0x73, 0x73, 0x77, 0x79, 0x79, 0x7A, 0x7B, 0x7A, 0x7B, 0x7B,	...
	0x7D, 0x7F, 0x82, 0x85, 0x87, 0x87, 0x87, 0x89, 0x8B, 0x8C, 0x8A, 0x89,	...
	0x89, 0x89, 0x86, 0x86, 0x85, 0x84, 0x84, 0x84, 0x81, 0x7F, 0x7E, 0x7A,	...
	0x77, 0x77, 0x76, 0x75, 0x73, 0x72, 0x73, 0x73, 0x73, 0x73, 0x76, 0x78,	...
	0x79, 0x7A, 0x7B, 0x7B, 0x7B, 0x7B, 0x7C, 0x7E, 0x81, 0x84, 0x86, 0x87,	...
	0x87, 0x88, 0x8B, 0x8B, 0x8A, 0x8A, 0x8A, 0x88, 0x87, 0x86, 0x85, 0x84,	...
	0x84, 0x84, 0x82, 0x81, 0x7F, 0x7C, 0x79, 0x78, 0x78, 0x77, 0x74, 0x73,	...
	0x74, 0x74, 0x73, 0x74, 0x76, 0x78, 0x79, 0x7B, 0x7C, 0x7C, 0x7C, 0x7C,	...
	0x7D, 0x7E, 0x80, 0x84, 0x86, 0x88, 0x85];

x = 1:1:1015;

function retval = acorsum (y)
  asum = 1:1:length(y);
  i = 1.0;
  while i <= length(y)
    k = 1.0;
    s = 0;
    while k <= (length(y) - i)
      s = s + (y(k)-128)*(y(k+i)-128)/256;
      k = k + 1;
    endwhile;
    asum(i) = s;
    
    i = i + 1;
  endwhile;
 
  retval = asum;
endfunction

result = acorsum(y);

plot (x, result(x), y(x));

